﻿#region

using System;
using DomainModel.Domain.Bases;
using DomainModel.Domain.Model.MessageTypeModel;
using DomainModel.Domain.Model.ServiceModel;
using DomainModel.Utils;

#endregion

namespace DomainModel.Domain.Model.SubscriptionModel
{
    public class Subscription : Entity<Subscription, SubscriptionId>
    {
        public Subscription(SubscriptionId id)
            : base(id)
        {
            Validate.NotNull(id, "SubscriptionId must not be null");
        }

        public virtual Service Publisher { get; set; }
        public virtual Service Subscriber { get; set; }
        public virtual MessageType MessageType { get; set; }
        public virtual DateTime RegisterDate { get; set; }

        protected internal Subscription()
        {
        }
    }
}